<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>实名认证管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/sys/userRealnameAuth/">实名认证列表</a></li>
		<li class="active"><a href="${ctx}/sys/userRealnameAuth/form?id=${userRealnameAuth.id}">实名认证<shiro:hasPermission name="sys:userRealnameAuth:edit">${not empty userRealnameAuth.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:userRealnameAuth:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="userRealnameAuth" action="${ctx}/sys/userRealnameAuth/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">用户：</label>
			<div class="controls">
				${userRealnameAuth.user.nickname}
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">用户姓名：</label>
			<div class="controls">
				${userRealnameAuth.realname}
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">用户身份证号：</label>
			<div class="controls">
				${userRealnameAuth.idno}
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">身份证正面：</label>
			<div class="controls">
				<img alt="" src="${file1path}">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">身份证背面：</label>
			<div class="controls">
				<img alt="" src="${file2path}">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">手持身份：</label>
			<div class="controls">
				<img alt="" src="${file3path}">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">审核状态：</label>
			<div class="controls">
				<form:select path="state" class="input-xlarge ">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('realname_auth_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		<div class="form-actions">
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保存审核状态"/>&nbsp;
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>